package com.cragon;

import com.cragon.config.AppConfig;
import com.cragon.entity.Child;
import com.cragon.entity.MyInterfaceImpl;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Test {
	public static void main(String[] args) {
		// ->AbstractApplicationContext->159
		AnnotationConfigApplicationContext ac = new AnnotationConfigApplicationContext(AppConfig.class);
//		ac.setAllowCircularReferences(true);
//		ac.register(AppConfig.class);
//		ac.refresh();
//		System.out.println(ac.getBean(Child.class));
		Test test = new Test();
		String name = "World";
		MyInterface say = test.say(name1 -> test.world(name1));
		System.out.println(say.get(name));
	}


	public MyInterface say(MyInterface myInterface) {
		return myInterface;
	}

	public String hello() {
		return "Hello";
	}

	public String world(String name) {
		return "Hello " + name;
	}
}
